package com.yuanian.ecsplus.page;

import com.github.pagehelper.Page;

import java.util.List;

public class Pagination<T> {

    private int pageNum;
    private int pageSize;
    private int startRow;
    private int endRow;
    private long total;
    private int pages;
    private boolean count;
    private Boolean reasonable;
    private Boolean pageSizeZero;
    private String countColumn;
    private String orderBy;
    private boolean orderByOnly;
    private List<T> result;

    public Pagination(Page page) {
        this.pageNum = page.getPageNum();
        this.pageSize = page.getPageSize();
        this.startRow = page.getStartRow();
        this.endRow = page.getEndRow();
        this.total = page.getTotal();
        this.pages = page.getPages();
        this.reasonable = page.getReasonable();
        this.pageSizeZero = page.getPageSizeZero();
        this.orderBy = page.getOrderBy();
        this.result = page.getResult();
    }


    public int getPageNum() {
        return pageNum;
    }


    public int getPageSize() {
        return pageSize;
    }


    public int getStartRow() {
        return startRow;
    }


    public int getEndRow() {
        return endRow;
    }


    public long getTotal() {
        return total;
    }


    public int getPages() {
        return pages;
    }


    public boolean isCount() {
        return count;
    }


    public Boolean getReasonable() {
        return reasonable;
    }


    public Boolean getPageSizeZero() {
        return pageSizeZero;
    }


    public String getCountColumn() {
        return countColumn;
    }


    public String getOrderBy() {
        return orderBy;
    }


    public boolean isOrderByOnly() {
        return orderByOnly;
    }


    public List<T> getResult() {
        return result;
    }
}
